<template>
    <fieldset>
        <legend>子组件</legend>
        <h1>{{g.gift}}</h1>
    </fieldset>
</template>
<script>
    export default {
        data(){
            return {
                msg:'javascript从入门到精通'
            }
        },
        inject:['g']
    }
</script>